home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / ab20_archive / applications / toolmanager-1.5.lzh / ToolManager / Scripts / DNetPutFiles.rexx < prev    next >
OS/2 REXX Batch file  |  1991-10-10  |  2KB  |  64 lines

  1. /*********************************************************/
  2. /*                                                       */
  3. /* rexx:DNetPutFiles.rexx  V1.0                          */
  4. /*                                                       */
  5. /* ARexx script for DNet's putfiles                      */
  6. /*                                                       */
  7. /* Requires rexxarplib.library V3.0                      */
  8. /*                                                       */
  9. /* © 1991 Stefan Becker                                  */
  10. /*                                                       */
  11. /* ToolManager configuration file entry for this script: */
  12. /*                                                       */
  13. /* CLI:                                                  */
  14. /* Alias    = Put Files                                  */
  15. /* RealName = rx DNetPutFiles                            */
  16. /* Path     = <path to DNet binaries>                    */
  17. /* #                                                     */
  18. /*                                                       */
  19. /* Problems: MULTISELECT requires, that you select ALL   */
  20. /*           files with the mouse. It won't work, if you */
  21. /*           simply type in the name :-( This seems to   */
  22. /*           be a bug in rexxarplib.                     */
  23. /*                                                       */
  24. /*********************************************************/
  25.  
  26. /* Parse command line */
  27. PARSE ARG cmdline
  28.  
  29. /* Set constants */
  30. output='CON:0/0/640/100/Uploading Files/AUTO/WAIT/ALT/INACTIVE'
  31.  
  32. /* Empty commandline? */
  33. IF cmdline=='' THEN
  34. DO
  35.  /* Try to open rexxarplib */
  36.  IF ~SHOW('Libraries','rexxarplib.library') THEN
  37.   IF ~ADDLIB('rexxarplib.library',0,-30,0) THEN RETURN 20
  38.  
  39.  /* Yes, put up a file requester */
  40.  GetFile(50,50,,,'Select file','Workbench','MULTISELECT PATGAD',files,,,'~(#?.info)')
  41.  
  42.  /* Build new command line */
  43.  DO i=1 TO files.0
  44.   cmdline=cmdline '"'files.i'"'
  45.  END
  46. END
  47.  
  48. IF cmdline=='' THEN
  49. /* No files selected */
  50. DO
  51.  /* Print out an error message */
  52.  IF OPEN(error,output,'Write') THEN
  53.   DO
  54.    WRITELN(error,'No files selected')
  55.    WRITELN(error,'exiting...')
  56.    CLOSE(error)
  57.   END
  58. END
  59. /* Upload files */
  60. ELSE ADDRESS COMMAND 'putfiles >"'output'"' cmdline
  61.  
  62. /* Exit script */
  63. RETURN 0
  64.